home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / pdcurs21.zip / PRIVATE.ZIP / _FINDWIN.C < prev    next >
Text File  |  1992-11-21  |  1KB  |  48 lines

  1. #define        CURSES_LIBRARY  1
  2. #include <curses.h>
  3.  
  4. #ifdef REGISTERWINDOWS
  5. #ifndef        NDEBUG
  6. char *rcsid__findwin = "$Header: c:/curses/private/RCS/_findwin.c%v 2.0 1992/11/15 03:24:42 MH Rel $";
  7. #endif
  8.  
  9.  
  10.  
  11.  
  12. /*man-start*********************************************************************
  13.  
  14.   PDC_findwin()        - Find a window in the visible windows list.
  15.  
  16.   PDCurses Description:
  17.        This is a private PDCurses routine.
  18.  
  19.        This routine is a part of the developing window registration
  20.        system that will reach maturity soon.
  21.  
  22.        This routine returns the passed WINDOW*'s WINDS pointer.
  23.  
  24.   PDCurses Return Value:
  25.        This function returns OK on success and ERR on error.
  26.  
  27.   PDCurses Errors:
  28.        No errors are defined for this function.
  29.  
  30.   Portability:
  31.        PDCurses        WINDS* PDC_findwin( WINDOW* win );
  32.  
  33. **man-end**********************************************************************/
  34.  
  35. WINDS* PDC_findwin(WINDOW *win)
  36. {
  37.        WINDS*  next = _cursvar.visible;
  38.  
  39.        while (next != (WINDS *)NULL)
  40.        {
  41.                if (next->w == win)
  42.                        break;
  43.                next = next->next;
  44.        }
  45.        return( next );
  46. }
  47. #endif
  48.